package com.jzj;

import com.jzj.Entity.Course;
import com.jzj.Entity.Student;
import com.jzj.Entity.Teacher;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {

        @Test
        public void test(){

        ApplicationContext context = new ClassPathXmlApplicationContext("bean.xml");

        Student student = context.getBean("student", Student.class);

        Course course = context.getBean("course1", Course.class);

        Teacher teacher = context.getBean("teacher", Teacher.class);


        System.out.println(student);
        System.out.println(course);
        System.out.println(teacher);

    }
}